package com.dios.mirage.component;

import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.container.HorizontalFieldManager;
import net.rim.device.api.ui.decor.BackgroundFactory;

import com.dios.mirage.component.fields.NavigationField;
import com.dios.mirage.content.AccessoriesContent;
import com.dios.mirage.content.DealerListContent;
import com.dios.mirage.content.HomeContent;
import com.dios.mirage.content.InteriorContent;
import com.dios.mirage.content.PriceContent;
import com.dios.mirage.content.SafetyContent;
import com.dios.mirage.navigation.ExteriorAndColourNavigation;
import com.dios.mirage.navigation.GalleryAndVideoNavigation;
import com.dios.mirage.navigation.ProductInformationNavigation;
import com.dios.mirage.navigation.UtilityAndElectronicNavigation;

public class NavigationFieldManager extends HorizontalFieldManager {
	
	public static final int HEIGTH = 50;

	public NavigationFieldManager() {
		super(Manager.HORIZONTAL_SCROLL);
		createGUI();
	}
	
	public void createGUI(){
		setBackground(BackgroundFactory.createSolidBackground(Color.BLACK));
		NavigationField homeField = new NavigationField("Home",new HomeContent());
		ExteriorAndColourNavigation exteriorAndColourNavigation = new ExteriorAndColourNavigation();
		NavigationField interiorField = new NavigationField("Interior",new InteriorContent());
		ProductInformationNavigation productInformationNavigation = new ProductInformationNavigation();
		UtilityAndElectronicNavigation utilityAndElectronicNavigation = new UtilityAndElectronicNavigation();
		NavigationField safetyField = new NavigationField("Safety",new SafetyContent());
		NavigationField accessoriesField = new NavigationField("Accessories",new AccessoriesContent());
		NavigationField priceField = new NavigationField("Prices", new PriceContent());
		NavigationField dealerField = new NavigationField("Find Dealer", new DealerListContent());
		GalleryAndVideoNavigation galleryField = new GalleryAndVideoNavigation();
		
		add(homeField);
		add(exteriorAndColourNavigation);
		add(interiorField);
		add(productInformationNavigation);
		add(utilityAndElectronicNavigation);
		add(safetyField);
		add(accessoriesField);
		add(priceField);
		add(dealerField);
		add(galleryField);
	}
	
	protected void sublayout(int maxWidth, int maxHeight) 
    {               
        super.sublayout(maxWidth, maxHeight);
        setExtent(maxWidth, HEIGTH);
    }

}
